// 引入 request 文件
import request from './index.js'
//登录接口
export const alluser = (data) => {
	return request({
		url: '/alluser',
		method: 'get',
		data
	})
}
//用户信息接口
export function userinfo(e) {
	let data ={'id':e}
  return request({
    url: '/userinfo',
    method: "post",
    data
  });
}
//注册接口
export function adduser(data) {
  return request({
    url: '/adduser',
    method: "post",
    data
  });
}
//头像设置
export function useredit() {
  return request({
    url: '/useredit',
    method: "post",
    
  });
}
//获取头像
export function avatar(data) {
  return request({
	  Headers:{
		responseType: 'blob',
	  }, 
    url: '/avatar',
    method: "post",
    data
  });
}
//token验证

export function verifytoken(e) {
let data = {}
	data.secretKey =e
	return request({
	  url: '/verifytoken',
	  method: "post",
	  data
	});
}
// 更新token 
export function Renewaltoken(data) {
	return request({
	  url: '/Renewaltoken',
	  method: "post",
	  data
	});
}
// 获取自己全部未读信息
export function allunreadmess(data) {
	return request({
	  url: '/allunreadmess',
	  method: "get",
	  data
	});
}